package com.rightsidetech.trade.dtos.request;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;

@Data
public class TdCommodityUserAppOrderDetailRequest implements Serializable {

    @ApiModelProperty(value = "商品id",required = true)
    @NotNull(message = "商品id不能为空")
    private Long commodityId;

    @ApiModelProperty(value = "购买方式,  0-直接买新, 1-以旧换新",required = true)
    @NotNull(message = "购买方式不能为空")
    @Range(min = 0,max = 1, message = "购买方式不正确")
    private Byte buyType;

    @ApiModelProperty(value = "商品条码",required = false)
    private String commodityBarCode;

    @ApiModelProperty(value = "商品规格",required = false)
    private String commoditySpecs;

/*    @ApiModelProperty(value = "单件价格",required = true)
    private BigDecimal commodityPrice;*/

    @ApiModelProperty(value = "商品数量",required = true)
    @NotNull(message = "商品数量不能为空")
    private Integer commodityNum;

/*    @ApiModelProperty(value = "商品标签, 0-商品, 1-赠品, 2-超值换购",required = true)
    @NotNull(message = "商品标签不能为空")
    @Range(min = 0,max = 2, message = "商品标签不正确")
    private Byte commodityTag;*/

    @ApiModelProperty("换购/赠品列表")
    private List<TdCommodityUserAppOrderDetailZPRequest> list;

/*    @ApiModelProperty("价格")
    private BigDecimal price;

    @ApiModelProperty("划线价")
    private BigDecimal underlinedPrice;*/

}
